package com.goods.shop.test;

import java.time.Duration;
import java.time.Instant;
import java.util.function.Consumer;
import java.util.stream.IntStream;
import java.util.stream.LongStream;

public class Main {
    public static void main(String[] args) {
//        Calculator calculator=new ForLoopCalculator();
//        Calculator calculator=new ExecutorServieCalculator();
//        Calculator calculator=new ForkJoinCalculator();
//        int[] numbers= IntStream.rangeClosed(0,100000).toArray();
//        Instant start=Instant.now();
//        long result=calculator.sum(numbers);
//        Instant end=Instant.now();
//        System.out.println("耗时："+ Duration.between(start,end).toMillis()+"毫秒");
//        System.out.println("结果:"+result);

//        Consumer<String> consumer=vo->{
//            System.out.println("====="+vo);
//        };
//        consumer.accept("111");


    }
}
